<template>
  <div class="container">
    <el-row class="mb10">
      <el-col :span="16" align="left">
        <div class="flex">
          <el-input
            clearable
            v-model="searchParams.projectname"
            placeholder="项目名称"
            style="width: 120px; margin-right: 15px"
          >
          </el-input>

          <el-input
            clearable
            v-model="searchParams.applicationunit"
            placeholder="申报单位/项目负责人"
            style="width: 180px; margin-right: 15px"
          >
          </el-input>

          <el-select clearable v-model="searchParams.completionperiod" placeholder="完成年限">
            <el-option
              :label="item.itemName"
              :value="item.itemValue"
              :key="item.itemValue"
              v-for="item in options.yearList"
            />
          </el-select>

          <el-date-picker
            style="width: 233px; margin-right: 15px"
            v-model="data.time"
            type="daterange"
            range-separator="-"
            start-placeholder="申报开始日期"
            end-placeholder="申报结束日期"
            @change="dataPickerChange"
          >
          </el-date-picker>

          <!--
          <el-select clearable v-model="searchParams.status" placeholder="状态">
            <el-option :label="item.itemName" :value="item.itemValue" :key="item.itemValue"
              v-for="item in options.statusDate" />
          </el-select>
-->
          <el-select v-model="data.statusUpdate" placeholder="状态">
            <el-option
              :label="item.itemName"
              :value="item.itemValue"
              :key="item.itemValue"
              v-for="item in options.statusDate"
            />
          </el-select>

          <el-button color="#626aef" @click="getListData" class="ordinary">搜索</el-button>
        </div>
      </el-col>
      <el-col :span="8" align="right">
        <!--        <el-button class="ordinary" @click="getExport()" v-limit="'XMZX:KYXMLXPS:PZLX:EXPORT'"> 批量导出</el-button>-->
        <el-button class="ordinary" @click="handleExport()" v-limit="'XMZX:KYXMLXPS:PZLX:EXPORT'">
          批量导出</el-button
        >
        <el-button type="primary" @click="handleExamina()" v-limit="'XMZX:KYXMLXPS:GZDGSC:OUTREV'"
          >批准立项</el-button
        >
      </el-col>
    </el-row>
    <el-table
      :data="data.allTableData"
      style="width: 100%"
      class="center-table"
      @selection-change="handleSelectionChange"
      @row-dblclick="handleRowClick"
      v-loading="data.allTableloading"
    >
      <el-table-column width="55" align="center" prop="checked" label="选择">
        <template #default="{ row, $index }">
          <el-checkbox
            v-model="row.checked"
            @change="selectTable($event, row, $index)"
          ></el-checkbox>
        </template>
      </el-table-column>
      <el-table-column
        label="序号"
        type="index"
        :index="indexMethod"
        width="60px"
      ></el-table-column>
      <ColumnData v-for="column of data.columns" :key="column.label" :item="column" />
      <el-table-column label="操作" width="200" fixed="right">
        <template #default="{ row }">
          <el-button
            size="small"
            @click="handleDetail(row)"
            class="ordinary"
            v-limit="'XMZX:KYXMLXPS:GZDGSC:DETAILS'"
            >详情</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <div class="tc mt15">
      <el-pagination
        background
        v-model:current-page="data.page"
        v-model:page-size="data.pageSize"
        layout="prev, pager, next ,total,jumper"
        :total="data.total"
        :page-size="data.pageSize"
        @current-change="pageChange"
      />
    </div>

    <el-dialog
      v-model="data.detailVisible"
      :append-to-body="false"
      width="900px"
      @close="data.detailVisible = false"
      :show-close="false"
      :close-on-click-modal="false"
    >
      <div class="my-header">
        <el-tabs v-model="activeName" class="demo-tabs">
          <el-tab-pane :initData="data.initData" label="详情信息" name="first">
            <el-form label-position="top" status-icon>
              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="项目名称">
                    <el-input
                      placeholder="请输入"
                      disabled
                      v-model="data.detail.projectname"
                      style="width: 100%"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="申报单位">
                    <el-input
                      placeholder="请输入"
                      disabled
                      v-model="data.detail.applicationunit"
                      style="width: 100%"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="项目负责人">
                    <el-input
                      placeholder="请输入"
                      disabled
                      v-model="data.detail.projectleader"
                      style="width: 100%"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="联系电话">
                    <el-input
                      disabled
                      maxlength="11"
                      placeholder="请输入"
                      v-model="data.detail.telephone"
                      style="width: 100%"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="完成年限">
                    <el-select
                      disabled
                      v-model="data.detail.completionperiod"
                      placeholder="请选择"
                      style="width: 100%"
                    >
                      <el-option
                        :label="item.itemName"
                        :value="item.itemValue"
                        :key="item.itemValue"
                        v-for="item in options.yearList"
                      />
                    </el-select>
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="总投资(万元)">
                    <el-input
                      disabled
                      placeholder="请输入"
                      v-model="data.detail.totalinvestment"
                      style="width: 100%"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="申请中咨拨款(万元)">
                    <el-input
                      disabled
                      placeholder="请输入"
                      v-model="data.detail.applyfunding"
                      style="width: 100%"
                    />
                  </el-form-item>
                </el-col>

                <el-col :span="12">
                  <el-form-item label="申报日期">
                    <el-date-picker
                      disabled
                      v-model="data.detail.reporttime"
                      placeholder="选择日期"
                      clearable
                      style="width: 100%"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row> </el-row>

              <el-form-item label="主要研究内容">
                <el-input
                  disabled
                  v-model="data.detail.researchcontents"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item label="主要技术经济指标">
                <el-input
                  disabled
                  v-model="data.detail.mainindicators"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item label="创新点及可能获得的成果和知识产权">
                <el-input
                  disabled
                  v-model="data.detail.describetwo"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item label="立项背景(包括项目背景、项目概况、研究的必要性等)">
                <el-input
                  disabled
                  v-model="data.detail.backdrop"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item label="国内外研究概况及可行性分析" prop="analysis">
                <el-input
                  disabled
                  v-model="data.detail.analysis"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item
                label="项目研究的主要内容及技术指标(包括要解决的主要技术难点和问题，研究的创新点和内容、主要技术指标及其水平、提交的成果及形式等)"
              >
                <el-input
                  disabled
                  v-model="data.detail.qualification"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item
                label="项目研究的技术路线(包括拟采取的技术路线，与后续技术改造或基本建设计划的衔接等)"
              >
                <el-input
                  disabled
                  v-model="data.detail.roadmap"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item
                label="推广应用前景及经济效益预测(包括市场需求或推广应用前景、经济效益，形成的生产能力或有关节约工程造价、缩短工期指标等)"
              >
                <el-input
                  disabled
                  v-model="data.detail.forecast"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item
                label="申报单位和协作单位及分工(包括项目承担单位、主要协作单位（仅限中咨集团下属单位）简介及分工等)"
              >
                <el-input
                  disabled
                  v-model="data.detail.dividethework"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>

              <el-form-item
                label="项目进度计划(包括年度工作进度安排及完成期限等)(包括项目承担单位、主要协作单位（仅限中咨集团下属单位）简介及分工等)"
              >
                <el-input
                  disabled
                  v-model="data.detail.programme"
                  :autosize="{ minRows: 2, maxRows: 6 }"
                  type="textarea"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-form>
          </el-tab-pane>
          <el-tab-pane label="项目经费预算" name="second">
            <!-- <BudgettableJson :fatherTableJson="data.tableJson" :addFlag="2" @tableJson="changeBudget" /> -->
            <Budget
              v-if="data.detailVisible"
              title="详情"
              :initData="data.tableJson"
              @tableJson="changeBudget"
            />
          </el-tab-pane>
          <el-tab-pane label="相关附件" name="4">
            <PlatformFilesxq
              :files="data.files"
              @filesParams="filesParams"
              download="KJSL:KJCG:XSLW:DOWNLOAD"
              upload="KJSL:KJCG:XSLW:UPLOAD"
              fileDelete="KJSL:KJCG:XSLW:FILEDELET"
            ></PlatformFilesxq>
          </el-tab-pane>

          <el-tab-pane
            v-if="data.approvalFormalExamination.modifyUsername"
            label="审批详情"
            name="approvalInfo"
          >
            <el-form class="inline-form" label-position="top" status-icon label-width="140px">
              <el-form-item label="审查结果：">
                {{ data.approvalFormalExamination.status }}
              </el-form-item>
              <el-form-item label="审查人：">
                {{ data.approvalFormalExamination.modifyUsername }}
              </el-form-item>
              <el-form-item label="审查时间：">
                {{ data.approvalFormalExamination.reviewtime }}
              </el-form-item>
              <el-form-item label="建议立项时间：">
                {{ data.approvalFormalExamination.ratifytime }}
              </el-form-item>
              <el-form-item label="审查意见：">
                <el-input
                  type="textarea"
                  disabled
                  v-model="data.approvalFormalExamination.comment"
                ></el-input>
              </el-form-item>
              <el-form-item label="附件：">
                <template
                  v-if="
                    data.approvalFormalExamination.files &&
                    data.approvalFormalExamination.files.length
                  "
                >
                  <div
                    v-for="(file, i) in data.approvalFormalExamination.files"
                    :key="'fiels' + i"
                    style="margin-right: 10px"
                  >
                    <el-link type="primary" :href="file.url" target="_blank">{{
                      file.name
                    }}</el-link>
                  </div>
                </template>
              </el-form-item>
            </el-form>
          </el-tab-pane>
        </el-tabs>
      </div>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="data.detailVisible = false">关闭</el-button>
        </span>
      </template>
    </el-dialog>

    <Dialog
      v-if="data.examinationVisible"
      :dialog="data.examinationVisible"
      @changeDialog="changeDialog"
      title="批准立项"
      :checkId="data.tableItem.id"
    >
    </Dialog>
    <!--新增、修改、确认弹框-->

    <!-- 导出字段选择 -->
    <Export
      :detailList="data.detailList"
      :showing="data.exportDialog"
      @close="closeExport"
      @handle-filed="handleFiled"
    ></Export>
  </div>
</template>
<script lang="ts">
import * as proxy from '@/constants/proxy'
import request from '@/utils/request'
import {
  getDetailById,
  getExportApply,
  getApprovalById,
} from '@/views/project/api/projectApplication'
import ColumnData from '@/views/science/components/table/column-data.vue'
import { Modals, tips } from '@/views/science/components/tips/tips'
import platformFiles from '@/views/science/technologyStrength/components/platformFiles/platformFiles.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import moment from 'moment'
import { ObjectType } from 'typings/interfaces'
import { reactive, ref } from 'vue'
// import Budget from "./components/budget.vue";
import Budget from '@/views/project/components/BudgetTable/budgetTable.vue'
import Dialog from './components/dialog.vue'
import tableData from './tableHeader.json'
import Export from '@/views/project/components/Export/index.vue'
// import BudgettableJson from "@/views/project/research-project/expertReview/budgetTable.vue";
import PlatformFiles from '@/views/project/research-project/expertReview/platformFiles/platformFiles.vue'
import PlatformFilesxq from '@/views/project/research-project/expertReview/platformFiles/platformFilesxq.vue'
import {getStatusText} from '@/utils/index'

export default {
  components: {
    // BudgettableJson,
    PlatformFiles,
    PlatformFilesxq,
    platformFiles,
    Budget,
    Dialog,
    ColumnData,
    Export,
  },
  props: {
    initData: {
      type: Object,
      required: true,
    },
    initNum: {
      type: Object,
      required: true,
    },
  },
  setup(props, { emit }) {
    let selectedRows: ObjectType[] = []
    //列表显示的字段
    //模态框以及信息栏是否显示
    let data = reactive({
      allTableData: [],
      tableItem: { id: '', status: '', type: '' }, //当前选中的行

      selectArr: [],
      checkId: '',
      examinationVisible: false,
      page: 1,
      pageSize: 10,
      total: 0,
      detailForm: {
        reporttime: null,
      },
      detail: {},
      detailVisible: false,
      columns: tableData.lxsqTableHeader,
      time: [],
      initData: {},
      persionDialogVisible: false, //  选择参与人员弹框
      ruleForm: {
        type: 7,
        applicationunit: '',
        projectleader: '',
      },
      files: [],
      tableJson: [],
      exportDialog: false,
      detailList: [] as any,
      allTableloading: false,
      statusUpdate: '', //状态判断
      approvalFormalExamination: {
        modifyUsername: '',
        comment: '',
        reviewtime: '',
        status: '',
        files: [],
      },
    })
    const closeExport = () => {
      data.exportDialog = false
    }
    const handleFiled = (arr) => {
      console.log(arr, 'handleFiled')
      let sdt = selectArr.map((el) => el.id)
      if (arr.length > 0) {
        ElMessageBox.confirm('您确认导出查询数据吗？', '批量导出', {
          confirmButtonText: '确认',
          cancelButtonText: '取消',
          type: 'warning',
        }).then(() => {
          // exportProjectList({ ...searchParams, ids: sdt.join(",") , headList: arr }, '科研项目数据表格')
          getExportApply(
            { ...searchParams, ids: [data.tableItem.id], headList: arr },
            '科研项目批准立项'
          )
          console.log('批量导出')
          data.exportDialog = false
        })
      }
    }
    const handleExport = () => {
      data.exportDialog = true
      data.detailList = [
        { fieldName: 'projectname', title: '项目名称' },
        { fieldName: 'applicationunit', title: '申请单位' },
        { fieldName: 'projectleader', title: '项目负责人' },
        { fieldName: 'telephone', title: '联系电话' },
        { fieldName: 'completionperiod', title: '完成年限' },
        { fieldName: 'totalinvestment', title: '总投资(万元)' },
        { fieldName: 'applyfunding', title: '申请中咨拨款（万元）' },
        { fieldName: 'reporttime1', title: '申报日期' },
        { fieldName: 'researchcontents', title: '主要研究内容' },
        { fieldName: 'mainindicators', title: '主要技术经济指标' },
        { fieldName: 'describetwo', title: '创新点及可能获得的成果和知识产权' },
        { fieldName: 'backdrop', title: '立项背景' },
        { fieldName: 'analysis', title: '国内外研究概况及可行性分析' },
        { fieldName: 'qualification', title: '项目研究的主要内容及技术指标' },
        { fieldName: 'roadmap', title: '项目研究的技术路线' },
        { fieldName: 'forecast', title: '推广应用前景及经济效益预测' },
        { fieldName: 'dividethework', title: '申报单位和协作单位及分工' },
        { fieldName: 'programme', title: '项目进度计划' },
      ]
    }
    interface Config {
      id: string
    }
    let selectArr: Config[] = reactive([])
    const handleSelectionChange = (val) => {
      selectArr = val
    }

    const indexMethod = (index) => {
      return data.pageSize * (data.page - 1) + index + 1
    }

    let loading = ref(true)
    // 查询参数
    let searchParams = reactive({
      type: 7,
      typeParams: 1,
      startTime: null,
      endTime: null,
    }) as any
    //单选
    const selectTable = (e, row, index) => {
      const data1 = data.allTableData

      //遍历表格的数据，将非本行的所有数据的checked属性置为false，即取消选择
      for (let i in data1) {
        if (i == index) {
          ;(data1[i] as any).checked = e
        } else {
          ;(data1[i] as any).checked = false
        }
      }
      data.allTableData = data1
      if (e) {
        data.tableItem = row
      } else {
        data.tableItem = { id: '', status: '', type: '' }
      }
    }
    const options: any = reactive({
      yearList: [
        { itemName: '2026年', itemValue: 2026 },
        { itemName: '2025年', itemValue: 2025 },
        { itemName: '2024年', itemValue: 2024 },
        { itemName: '2022年', itemValue: 2022 },
        { itemName: '2021年', itemValue: 2021 },
        { itemName: '2020年', itemValue: 2020 },
        { itemName: '2019年', itemValue: 2019 },
      ],
      statusDate: [
        { itemName: '全部', itemValue: '10' },
        { itemName: '待审查', itemValue: '1' },
        { itemName: '批准立项', itemValue: '2' },
        { itemName: '审批不通过', itemValue: '3' },
        // { itemName: "批准立项", itemValue: "4" },
      ],
      unitnameList: [],
      affiliationList: [],
      SoftnessList: [],
      classnameList: [],
      competitionclassList: [],
      belongingunitList: [],
      awardList: [],
      zlztList: [],
      jsflList: [],
      xmlbList: [],
      yhrenList: [],
    })

    const changeDialog = () => {
      data.tableItem.id = ''
      getListData()
      data.examinationVisible = false
    }
    // 清除日期选择器,删除的时候将日期清空
    const dataPickerChange = () => {
      if (data.time) {
        searchParams.startTime = data.time[0]
        searchParams.endTime = data.time[1]
      } else {
        searchParams.startTime = null
        searchParams.endTime = null
        data.time = []
      }
    }

    const pageChange = (current) => {
      data.page = current
      getListData()
    }
    const getListData = async () => {
      data.selectArr = []
      loading.value = true

      data.allTableloading = true
      if (data.statusUpdate == '1') {
        searchParams.type = 7
        searchParams.status = 1
        searchParams.typeParams = 0
      } else if (data.statusUpdate == '2') {
        searchParams.type = 7
        searchParams.status = 2
        searchParams.typeParams = 0
      } else if (data.statusUpdate == '3') {
        searchParams.type = 7
        searchParams.status = 3
        searchParams.typeParams = 0
      } else if (data.statusUpdate == '4') {
        searchParams.type = 7
        searchParams.status = 4
        searchParams.typeParams = 0
      } else if (data.statusUpdate == '10') {
        searchParams.type = 7
        searchParams.typeParams = 1
        delete searchParams.status
      }

      return request({
        url: proxy.CHECC_API_CMS + '/xmzx/kyxmlxps/approvalApplication/getTotalList',
        method: 'post',
        data: {
          ...searchParams,
          page: data.page,
          pageSize: data.pageSize,
        },
      })
        .then((res) => {
          let resData = res.data.data.records
          //草稿、待审批、审批通过、审批拒绝
          resData.map((item: any) => {
            if (item.status == 1 && item.type == 7) {
              item.status = '待审查'
            } else if (item.status == 2 && item.type == 7) {
              item.status = '批准立项'
            } else if (item.status == 3 && item.type == 7) {
              item.status = '审批不通过'
            }

            if (item) {
              item.reporttimeFormat = moment(item.reporttime).format('YYYY-MM-DD')
            }
          })

          //给数据添加checked属性并默认置为false
          for (let index in res.data.data.records) {
            res.data.data.records[index].checked = false
          }

          data.allTableData = res.data.data.records
          data.total = res.data.data.total
          data.allTableloading = false
        })
        .finally(() => {
          loading.value = false
          data.allTableloading = false
        })
    }
    getListData()
    //形式审查
    const handleExamina = () => {
      if (!data.tableItem.id) {
        ElMessage({
          message: '请选择一条数据，进行判断',
          type: 'warning',
        })
        return false
      } else if (data.tableItem.status == '批准立项') {
        tips('已审核通过，无需批准立项', 'warning')
        return false
      } else if (data.tableItem.status == '审批不通过') {
        tips('请选择处于待审查', 'warning')
        return false
      } else {
        data.examinationVisible = true
      }
    }
    //主页面表格初始化
    //新增
    const ruleFormRef = ref()

    const handleClose = () => {
      for (let key in data.ruleForm) {
        data.ruleForm[key] = ''
      }
    }

    const ruleForm = reactive({})

    const handleRowClick = (row) => {
      handleDetail(row)
    }
    let handleDetail = async (row) => {
      data.allTableloading = true
      activeName.value = 'first'
      getApprovalById(row.id).then(arew => {
        if(arew.data.success) {
          let item = arew.data.data.approvalFormalExamination
          if(item) {
            let file = item.examinationurl ? JSON.parse(item.examinationurl) : []
            item.reviewtime = moment(item.reviewtime).format('YYYY-MM-DD hh:mm:ss')
            item.files = file
            if(item.status === 7  && item.type === '1') {
                data.approvalFormalExamination = {
                modifyUsername: '',
                comment: '',
                reviewtime: '',
                status: '',
                files: []
              }
            } else {
              data.approvalFormalExamination = item
              data.approvalFormalExamination.status = getStatusText([Number(item.status), Number(item.type)])
            }
            if( row.status === "批准立项") {
              data.approvalFormalExamination = item
              data.approvalFormalExamination.status = getStatusText([Number(item.status), Number(item.type)])
            }
          } else {
            data.approvalFormalExamination = {
              modifyUsername: '',
              comment: '',
              reviewtime: '',
              status: '',
              files: []
            }
          }
      
        }
      })
      let res = await getDetailById(row.id)
      activeName.value = 'first'
      data.allTableloading = false
      if (res.data.success) {
        data.detail = res.data.data.info
        data.tableJson = res.data.data.contractBudgetList
        data.files = res.data.data.files
        data.detailVisible = true
      }
    }

    // const handleSelectionChange = () => {
    //
    // }

    // 导出

    const getExport = async () => {
      Modals('是否导出全部数据', '提示', 'warning')
        .then(async () => {
          await getExportApply(searchParams, '批准立项')
        })
        .catch(() => {
          console.log('点击了取消')
        })
    }
    //page分页
    let getpageData = () => {
      data.selectArr = []
      getListData()
    }

    const activeName = ref('first')
    let filesParams = (params) => {
      data.files = params
    }

    // 预算
    let changeBudget = (parmas) => {
      data.tableJson = parmas.contractBudgetList
    }

    return {
      data,
      dataPickerChange,
      selectTable,
      handleExamina, // 审核
      handleClose,
      handleDetail, //确认
      getListData, // 获取列表信息
      getpageData, // 分页信息
      pageChange,
      getExport,
      options, //维护单位字典
      selectedRows,
      searchParams,
      activeName,
      indexMethod,
      handleSelectionChange,
      changeDialog,
      //审核

      closeExport,
      handleFiled,
      handleExport,
      handleRowClick,
      filesParams,
      changeBudget,
    }
  },
}
</script>
<style lang="scss" scoped>
.container {
  background-color: white;
  padding: 20px;
}

.el-col {
  line-height: 40px;
}

.el-form-item {
  .el-input {
    width: 100px;
    background-color: aliceblue;
  }

  .el-select {
    width: 100px;
  }
}

:deep(.demo-tabs > .el-tabs__content) {
  max-height: 500px;

  overflow-y: scroll;

  scrollbar-width: none;

  -ms-overflow-style: none;
}

:deep(.el-dialog__header) {
  display: none;
}

:deep(.center-table td),
:deep(.center-table th) {
  text-align: center !important;
}

:deep(.center-table) {
  margin-top: 15px;
}

.custom-color {
  color: red !important;
  /* 确保优先级高于其他样式 */
}

.el-table th {
  background-color: #f0f0f0;
  /* 修改表头背景色 */
  color: #333;
  /* 修改表头文字颜色 */
}

.demo-tabs > .el-tabs__content {
  padding: 320px;
  color: #6b778c;
  font-size: 32px;
  font-weight: 600;
}

.open-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

/deep/ .el-dialog__body {
  display: block !important;
}

.mt15 {
  margin-top: 15px;
}

.mb10 {
  margin-bottom: 10px;
}

.tc {
  text-align: center;
}

.info {
  display: flex;
}

thead .el-table-column--selection .cell {
  display: none !important;
}
.inline-form::v-deep {
  .el-form-item {
    display: flex;
  }
  .el-form-item__label {
    width: 120px;
    text-align: right;
  }
  .el-form-item__content {
    opacity: 0.8;
  }
}
</style>
